package com.wanmait.myhouse.util;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

public class CookieUtils {
    public static void createCookie(String name, String value, int time, String path, HttpServletResponse response){
        Cookie cookie = new Cookie(name,value);
        cookie.setMaxAge(time);
        cookie.setPath(path);
        response.addCookie(cookie);
    }
}
